package com.zhangj.springcloud.service.impl;

import com.zhangj.springcloud.entites.Payment;
import com.zhangj.springcloud.mapper.PaymentMapper;
import com.zhangj.springcloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ClassName PaymentServiceImpl
 * @Description
 * @Author zhangjie
 * @Date 2022/1/15 13:59
 * @Version 1.0
 */

@Service
@Transactional
public class PaymentServiceImpl implements PaymentService {

    @Autowired
    private PaymentMapper paymentMapper;

    @Override
    public int creat(Payment payment) {
        return paymentMapper.creat(payment);
    }

    @Override
    public Payment getPaymentById(Long id) {
        return paymentMapper.getPayment(id);
    }
}
